package com.sgb.kjwl.view.ui.activity.enterprise;


import android.content.Context;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import androidx.annotation.Nullable;

import com.sgb.kjwl.R;
import com.sgb.kjwl.utils.TextViewUtils;

/**
 * @author oldwang
 */
public class QuestionView extends LinearLayout {
    public QuestionView(Context context) {
        super(context);
    }

    public QuestionView(Context context, @Nullable @org.jetbrains.annotations.Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    public QuestionView(Context context, @Nullable @org.jetbrains.annotations.Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }


    public QuestionView(Context mContext,String title,String content,OnClickListener mlister){
        super(mContext);
        LayoutInflater.from(mContext).inflate(R.layout.layout_question, this);
        TextView tv_title = findViewById(R.id.tv_title);
        TextView tv_content1 = findViewById(R.id.tv_content1);
        if(!TextUtils.isEmpty(title)){
            tv_title.setText(title);
        }

        if(!TextUtils.isEmpty(content)){
            tv_content1.setText(content+"            ");
        }

        setOnClickListener(mlister);



    }

}
